/*
 Navicat Premium Data Transfer

 Source Server         : dingyiHuaWei
 Source Server Type    : MySQL
 Source Server Version : 50742 (5.7.42)
 Source Host           : 114.116.2.58:3306
 Source Schema         : contest_team_up

 Target Server Type    : MySQL
 Target Server Version : 50742 (5.7.42)
 File Encoding         : 65001

 Date: 02/07/2023 16:08:46
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for t_all_user
-- ----------------------------
DROP TABLE IF EXISTS `t_all_user`;
CREATE TABLE `t_all_user` (
  `number` int(11) NOT NULL COMMENT '学号',
  `user_id` int(11) DEFAULT NULL COMMENT '用户编号',
  `isRegistered` int(1) DEFAULT NULL COMMENT '是否已注册,0-未注册,1-已注册',
  `role` int(1) DEFAULT NULL COMMENT '角色,0-管理员,1-用户',
  PRIMARY KEY (`number`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of t_all_user
-- ----------------------------
BEGIN;
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (230101, 12, 1, 0);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (230102, NULL, 0, 0);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (230201, NULL, 0, 0);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (230202, 15, 1, 0);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (190100101, 13, 1, 1);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (190100102, NULL, 0, 1);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (190100103, NULL, 0, 1);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (190100104, NULL, 0, 1);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (190100105, NULL, 0, 1);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (190100106, NULL, 0, 1);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (190100107, NULL, 0, 1);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (190100108, NULL, 0, 1);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (190100109, NULL, 0, 1);
INSERT INTO `t_all_user` (`number`, `user_id`, `isRegistered`, `role`) VALUES (190100110, NULL, 0, 1);
COMMIT;

-- ----------------------------
-- Table structure for t_contest
-- ----------------------------
DROP TABLE IF EXISTS `t_contest`;
CREATE TABLE `t_contest` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `species_id` int(32) DEFAULT NULL,
  `info` text,
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `is_deleted` int(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of t_contest
-- ----------------------------
BEGIN;
INSERT INTO `t_contest` (`id`, `name`, `species_id`, `info`, `start_date`, `end_date`, `is_deleted`) VALUES (1, '全国大学生数学建模比赛', 2, '为了培养学生的创新意识及运用数学方法和计算机技术解决实际问题的能力，中国工业与应用数学学会全国大学生数学建模竞赛组委会决定举办2022高教社杯全国大学生数学建模竞赛（以下简称竞赛），欢迎各高等院校按照竞赛章程、参赛规则及有关规定组织同学报名参赛。', '2023-04-23', '2023-09-20', 0);
INSERT INTO `t_contest` (`id`, `name`, `species_id`, `info`, `start_date`, `end_date`, `is_deleted`) VALUES (2, '生物竞赛', 12, '海洋生物竞赛', '2023-04-23', '2023-09-20', 0);
INSERT INTO `t_contest` (`id`, `name`, `species_id`, `info`, `start_date`, `end_date`, `is_deleted`) VALUES (7, '大学生物理竞赛', 5, '限三人参加', '2023-05-09', '2023-09-17', 0);
INSERT INTO `t_contest` (`id`, `name`, `species_id`, `info`, `start_date`, `end_date`, `is_deleted`) VALUES (9, '第十四届全国大学生数学竞赛', 2, '第十四届全国决赛及颁奖大会将在广东工业大学(大学城校区) 举行，现将参赛事宜通知如下。\n一、注册及缴费\n带队教师收取会务费: 400 元/人，学生收取会务费:300 元/人，由广东工业大学统一开具发票。请带队教师和参赛学生按照附件1的指引进行会议的注册和缴费,截止日期：2023 年 4 月 30 日。\n二、参赛学生照片提交\n所有参赛学生需要提交电子照片，具体要求为：近期免冠一寸彩色照片，格式为*.JPG文件，命名为:赛区+姓名(如广东赛区+某某某)，不小于 8K，尺寸(像素)为宽 150 ，高 210。请参赛考生将照片提交至赛区负责人处，各赛区以赛区为单位将照片提交至竞赛组委会邮箱: gdmaths@163.com。', '2023-05-25', '2023-09-14', 0);
INSERT INTO `t_contest` (`id`, `name`, `species_id`, `info`, `start_date`, `end_date`, `is_deleted`) VALUES (10, '创新大赛', 7, '设计开发', '2023-05-01', '2024-05-30', 0);
COMMIT;

-- ----------------------------
-- Table structure for t_contest_notice
-- ----------------------------
DROP TABLE IF EXISTS `t_contest_notice`;
CREATE TABLE `t_contest_notice` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `contest_id` int(32) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `context` text,
  `insert_time` datetime DEFAULT NULL,
  `update_time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of t_contest_notice
-- ----------------------------
BEGIN;
INSERT INTO `t_contest_notice` (`id`, `contest_id`, `title`, `context`, `insert_time`, `update_time`) VALUES (8, 1, '赛事人员配置说明', '参赛人数最多为5人。', '2023-05-25 11:46:35', '2023-05-25 11:46:35');
INSERT INTO `t_contest_notice` (`id`, `contest_id`, `title`, `context`, `insert_time`, `update_time`) VALUES (9, 1, '赛事活动通知', '请于2023.05.23前往一区公共教室301参加赛事说明会。', '2023-05-25 11:47:59', '2023-05-25 11:47:59');
INSERT INTO `t_contest_notice` (`id`, `contest_id`, `title`, `context`, `insert_time`, `update_time`) VALUES (10, 1, '活动说明', '5.25晚上7:30参加培训', '2023-05-25 20:35:46', '2023-05-25 20:35:46');
INSERT INTO `t_contest_notice` (`id`, `contest_id`, `title`, `context`, `insert_time`, `update_time`) VALUES (11, 10, '活动说明', '5.25晚上7:30参加培训', '2023-05-25 20:36:21', '2023-05-25 20:36:21');
COMMIT;

-- ----------------------------
-- Table structure for t_notice_status
-- ----------------------------
DROP TABLE IF EXISTS `t_notice_status`;
CREATE TABLE `t_notice_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `team_notice_id` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of t_notice_status
-- ----------------------------
BEGIN;
INSERT INTO `t_notice_status` (`id`, `team_notice_id`, `user_id`) VALUES (1, 4, 3);
INSERT INTO `t_notice_status` (`id`, `team_notice_id`, `user_id`) VALUES (3, 8, 3);
INSERT INTO `t_notice_status` (`id`, `team_notice_id`, `user_id`) VALUES (4, 9, 8);
COMMIT;

-- ----------------------------
-- Table structure for t_species
-- ----------------------------
DROP TABLE IF EXISTS `t_species`;
CREATE TABLE `t_species` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `is_deleted` int(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of t_species
-- ----------------------------
BEGIN;
INSERT INTO `t_species` (`id`, `name`, `is_deleted`) VALUES (2, '数学竞赛', 0);
INSERT INTO `t_species` (`id`, `name`, `is_deleted`) VALUES (5, '物理竞赛', 0);
INSERT INTO `t_species` (`id`, `name`, `is_deleted`) VALUES (6, '化学竞赛', 0);
INSERT INTO `t_species` (`id`, `name`, `is_deleted`) VALUES (7, '计算机竞赛', 0);
INSERT INTO `t_species` (`id`, `name`, `is_deleted`) VALUES (9, '征文大赛', 1);
INSERT INTO `t_species` (`id`, `name`, `is_deleted`) VALUES (10, '英语竞赛', 0);
INSERT INTO `t_species` (`id`, `name`, `is_deleted`) VALUES (11, '建模大赛', 0);
INSERT INTO `t_species` (`id`, `name`, `is_deleted`) VALUES (12, '生化竞赛', 0);
COMMIT;

-- ----------------------------
-- Table structure for t_team
-- ----------------------------
DROP TABLE IF EXISTS `t_team`;
CREATE TABLE `t_team` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `contest_id` int(32) DEFAULT NULL,
  `info` varchar(255) DEFAULT NULL,
  `is_deleted` int(1) unsigned zerofill DEFAULT '0',
  `demand` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of t_team
-- ----------------------------
BEGIN;
INSERT INTO `t_team` (`id`, `name`, `contest_id`, `info`, `is_deleted`, `demand`) VALUES (21, '数字时代队', 1, '欢迎大家踊跃加入，勇夺佳绩！', 0, '还需2人，建模能力和英文好的优先。');
INSERT INTO `t_team` (`id`, `name`, `contest_id`, `info`, `is_deleted`, `demand`) VALUES (22, '华罗庚弟子队', 9, '927宿舍组队打数学竞赛', 0, '暂不接收其他人员');
INSERT INTO `t_team` (`id`, `name`, `contest_id`, `info`, `is_deleted`, `demand`) VALUES (23, '明教队', 1, '明教教主张无忌所创，乾坤大挪移。', 0, '六大门派围攻光明顶，速来助我，需3名队友');
INSERT INTO `t_team` (`id`, `name`, `contest_id`, `info`, `is_deleted`, `demand`) VALUES (24, '虫虫加油', 9, '两枚理学院的小姐姐呀~', 0, '思维灵活的男生');
COMMIT;

-- ----------------------------
-- Table structure for t_team_member
-- ----------------------------
DROP TABLE IF EXISTS `t_team_member`;
CREATE TABLE `t_team_member` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `user_id` int(32) DEFAULT NULL,
  `user_name` varchar(32) DEFAULT NULL,
  `role` int(1) DEFAULT NULL,
  `status` int(1) DEFAULT NULL,
  `team_id` int(32) DEFAULT NULL,
  `join_note` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of t_team_member
-- ----------------------------
BEGIN;
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (41, 2, '测试账号', 0, 1, 21, '队伍创始人');
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (42, 2, '测试账号', 0, 1, 22, '队伍创始人');
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (43, 3, '李四', 1, 1, 21, '3年2班李四申请加入队伍，数学良好，文字功底良好');
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (45, 4, '王五2', 1, 1, 21, '王五申请加入队伍，文字撰写能力较强');
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (46, 9, '张无忌', 0, 1, 23, '队伍创始人');
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (47, 9, '张无忌', 1, 1, 22, '张无忌加入队伍');
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (48, 8, '苗', 1, 1, 21, '管理员添加的成员');
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (49, 8, '苗', 1, 1, 22, '苗申请加入队伍');
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (50, 14, '刘彤', 0, 1, 24, NULL);
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (51, 14, '刘彤', 1, 0, 23, '能够熟练使用MATLAB');
INSERT INTO `t_team_member` (`id`, `user_id`, `user_name`, `role`, `status`, `team_id`, `join_note`) VALUES (52, 13, '舒适圈', 1, 1, 24, '加油加油');
COMMIT;

-- ----------------------------
-- Table structure for t_team_notice
-- ----------------------------
DROP TABLE IF EXISTS `t_team_notice`;
CREATE TABLE `t_team_notice` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `notice` text,
  `insert_time` datetime(6) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `update_time` datetime(6) DEFAULT NULL,
  `team_id` int(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of t_team_notice
-- ----------------------------
BEGIN;
INSERT INTO `t_team_notice` (`id`, `notice`, `insert_time`, `title`, `update_time`, `team_id`) VALUES (10, '下午3点腾讯会议开会，望周知', '2023-05-25 12:25:44.000000', '开会通知', '2023-05-25 12:25:44.000000', 21);
INSERT INTO `t_team_notice` (`id`, `notice`, `insert_time`, `title`, `update_time`, `team_id`) VALUES (11, '今天下午6号楼楼下见面会', '2023-05-26 22:22:12.000000', '组队', '2023-05-26 22:22:12.000000', 24);
COMMIT;

-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
  `id` int(32) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `role` int(1) DEFAULT NULL,
  `sex` varchar(32) DEFAULT NULL,
  `number` varchar(32) DEFAULT NULL,
  `major` varchar(255) DEFAULT NULL,
  `class_name` varchar(255) DEFAULT NULL,
  `info` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of t_user
-- ----------------------------
BEGIN;
INSERT INTO `t_user` (`id`, `username`, `password`, `role`, `sex`, `number`, `major`, `class_name`, `info`, `name`, `email`) VALUES (1, 'admin', 'admin', 0, NULL, NULL, NULL, NULL, NULL, '管理员', NULL);
INSERT INTO `t_user` (`id`, `username`, `password`, `role`, `sex`, `number`, `major`, `class_name`, `info`, `name`, `email`) VALUES (2, 'test', 'test', 1, '男', '17172199821', '软件工程', '1782', '预备役码农', '测试账号', 'test@163.com');
INSERT INTO `t_user` (`id`, `username`, `password`, `role`, `sex`, `number`, `major`, `class_name`, `info`, `name`, `email`) VALUES (3, 'lisi', 'lisi', 1, NULL, NULL, NULL, NULL, NULL, '李四', NULL);
INSERT INTO `t_user` (`id`, `username`, `password`, `role`, `sex`, `number`, `major`, `class_name`, `info`, `name`, `email`) VALUES (4, 'wangwu', 'wangwuwangwu', 1, '男', '1711650329', '软件工程', '班级名称', '我是一个代码搬运工', '王五2', '18181@qq.com');
INSERT INTO `t_user` (`id`, `username`, `password`, `role`, `sex`, `number`, `major`, `class_name`, `info`, `name`, `email`) VALUES (8, 'qwer', 'qwer', 1, '女', '191604125', '信管', '191', '不负韶华', '苗', '2523434556@qq.com');
INSERT INTO `t_user` (`id`, `username`, `password`, `role`, `sex`, `number`, `major`, `class_name`, `info`, `name`, `email`) VALUES (9, 'zhangwuji', 'zhangwuji', 1, '男', '191121012', '管理学', '3班', '明教教主张无忌', '张无忌', 'mingjiao@qq.com');
INSERT INTO `t_user` (`id`, `username`, `password`, `role`, `sex`, `number`, `major`, `class_name`, `info`, `name`, `email`) VALUES (12, 'limochou', 'limochou', 0, NULL, NULL, NULL, NULL, NULL, '李老师', NULL);
INSERT INTO `t_user` (`id`, `username`, `password`, `role`, `sex`, `number`, `major`, `class_name`, `info`, `name`, `email`) VALUES (13, '12345', '12345', 1, NULL, NULL, NULL, NULL, NULL, '舒适圈', NULL);
INSERT INTO `t_user` (`id`, `username`, `password`, `role`, `sex`, `number`, `major`, `class_name`, `info`, `name`, `email`) VALUES (14, '123456', '123456', 1, NULL, NULL, NULL, NULL, NULL, '刘彤', NULL);
INSERT INTO `t_user` (`id`, `username`, `password`, `role`, `sex`, `number`, `major`, `class_name`, `info`, `name`, `email`) VALUES (15, '1234567', '1234567', 0, NULL, NULL, NULL, NULL, NULL, '王阳阳', NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
